//
//  NoNetworkView.m
//  DongFeng_Online-Banking-APP
//
//  Created by wxt on 2021/4/25.
//

#import "NoNetworkView.h"

@implementation NoNetworkView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (instancetype)initWithFrame:(CGRect)frame{

    if (self = [super initWithFrame:frame]) {

    
    [self addUIView];
    
 }

 return self;

}
-(void)addUIView{
    
    UIView * bgView = [[UIView alloc]initWithFrame:self.bounds];
    [self addSubview:bgView];
    bgView.backgroundColor = Wcolor;
    
    tklImgView * signImg = [tklImgView imgViewWithFrame:CGRectMake(22, kHeight/2-140, kWidth-44, 93) img:@"编组 3"];
    [self addSubview:signImg];
    
    TKLlable * signLab = [TKLlable labelWithFrame:CGRectMake(22, CGRectGetMaxY(signImg.frame)+7, kWidth-44, 20) text:@"当前网络不可用" textColor:JhColor(124, 124, 124) font:Font_6(14) textAlignment:Textcenter backgroundColor:Ccolor];
    [self addSubview:signLab];
    
    UIButton * againBtn = [UIButton createBtnFrame:CGRectMake(kWidth/2-41, CGRectGetMaxY(signLab.frame)+30, 82, 30) title:@"点击重试" bgImageName:@"" textcolor:Bcolor laycolor:JhColor(151, 151, 151) action:^(UIButton *button) {
        if ([self.delegate respondsToSelector:@selector(CancelAction)]) {
            [self.delegate CancelAction];
        }
    }];
    againBtn.layer.cornerRadius = 15;
    againBtn.layer.masksToBounds = YES;
    [self addSubview:againBtn];
    
    
}

@end
